<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script src="js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
		//作业
		//1、实现将鼠标移动到指定的图片位置时，出现大图片预览
		$(function(){
			
		
			$('#img').mouseover(function(){
				$img=$('#img').clone();
				$('#show').append($img);
				
				$('#show img').css("width",'500px');
				$('#show img').css("height",'500px');
    		//获取鼠标在图片上的坐标 
//  		console.log('X：' + event.offsetX+'\n Y:' + event.offsetY);
				
			});
			
			$('#img').mouseout(function(){
				$('#show').empty();
				
			});
		})
		</script>
		<style type="text/css">
			img{
				width: 200px;
				height: 200px;
			}
			#img{
				display: inline-block;
			}
			#show{
				display: inline-block;
				position: absolute;
				
			}
		</style>
	</head>
	<body>
		<div id="img">
			<img src="img/0IdpNSdUJ4.jpg"/>
			
		</div><div id="show">
				
		</div>
		
		
		
	</body>
</html>
